package ch8;

public class HomeWork1 {

	//在命令行执行java程序:
	//java命令启动jvm，装载java类，并接收参数
	//java com.corejava.ch8.HomeWork1 参数列表（多个参数使用空格分开）
	public static void main(String[] args) {

		try {
			int a = Integer.parseInt(args[0]);
			int b = Integer.parseInt(args[1]);

			int c = a / b;
			System.out.println(c);
		} catch (IndexOutOfBoundsException e) {
			e.printStackTrace();
		} catch (NumberFormatException e) {
			e.printStackTrace();
		} catch (ArithmeticException e) {
			e.printStackTrace();
		} finally {
			System.out.println("一定执行");
		}

	}

}
